home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntreskit.exe / OEMNSVKT.INF < prev    next >
INI File  |  1993-09-01  |  39KB  |  1,282 lines

  1. ;------------------------------------------------------------------------
  2. ;  Copyright(c) 1992-93 Microsoft Corporation
  3. ;
  4. ;  Services for Macintosh Admin Tools Kit
  5. ;
  6. ;  Author: KrishG
  7. ;
  8. ;------------------------------------------------------------------------
  9.  
  10. [Identification]
  11.    OptionType = NetService
  12. [Options]
  13.    SFMADM
  14.    ATALK
  15. [GeneralConstants]
  16. UtilInf                     = "UTILITY.INF"
  17. SubInf                      = "SUBROUTN.INF"
  18. !KeyNull                    = ""
  19. !ACCESS                     = 33554432
  20. RegistryErrorIndex            = NO_ERROR
  21. KeyProduct                  = ""
  22. KeyParameters                = ""
  23. TRUE                        = 1
  24. FALSE                       = 0
  25. NoTitle                     = 0
  26. !DebugOutputControl         = 1
  27. ProductInfName            = "oemnsvkt.inf"
  28.  
  29. [FileConstants]
  30. Manufacturer        = "Microsoft"
  31. ProductMajorVersion = "3"
  32. ProductMinorVersion = "1"
  33. ProductVersion        = $(ProductMajorVersion)"."$(ProductMinorVersion)
  34. ProductSFMName        = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\SFM\CurrentVersion"
  35. !ProductKeyLinkage  = $(!NTN_ServiceBase)"\"$(ProductATALKName)"\Linkage"
  36.  
  37. ;------------------------------------------------------------------------
  38. ; Dll And File Names
  39. ;---------------------------------------------------------------------
  40. UtilDll                  = "sfmutil.dll"
  41. ResDll                   = "sfmres.dll"
  42. NtNetIniFileName         = "ntnet.ini"
  43. WinFileIniFileName       = "winfile.ini"
  44. AfpMgrCplFile            = "sfmmgr.dll"
  45. SrvMgrIniSection         = "SMAddons"
  46. WinFileIniSection        = "Addons"
  47. AtWinSockDll             = "sfmwshat.dll"
  48.  
  49. [Identify]
  50.    read-syms Identification
  51.    set Status     = STATUS_SUCCESSFUL
  52.    set Identifier = $(OptionType)
  53.    set Media      = #("Source Media Descriptions", 1, 1)
  54.    Return $(Status) $(Identifier) $(Media)
  55.  
  56. [ReturnOptions]
  57.    set Status            = STATUS_FAILED
  58.    set OptionList         = {}
  59.    set OptionTextList     = {}
  60.    set LanguageList     = ^(LanguagesSupported, 1)
  61.    Ifcontains(i) $($0) in $(LanguageList)
  62.         goto returnoptions
  63.    else
  64.       set Status = STATUS_NOLANGUAGE
  65.       goto finish_ReturnOptions
  66.    endif
  67. returnoptions = +
  68.    set OptionList     = ^(Options, 1)
  69.    set OptionTextList = ^(OptionsText$($0), 1)
  70.    set Status         = STATUS_SUCCESSFUL
  71.  
  72. finish_ReturnOptions = +
  73.    Return $(Status) $(OptionList) $(OptionTextList)
  74.  
  75.  
  76. [date]
  77. Now     = {} ? $(!LIBHANDLE) GetSystemDate
  78.  
  79.  
  80. [InstallOption]
  81.    set Status   = STATUS_FAILED
  82.    set Option   = $($1)
  83.    set SrcDir   = $($2)
  84.    Set AddCopy  = $($3)
  85.    Set DoCopy   = $($4)
  86.    Set DoConfig = $($5)
  87.  
  88.    set LanguageList = ^(LanguagesSupported, 1)
  89.  
  90.    Ifcontains(i) $($0) NOT-IN $(LanguageList)
  91.       return STATUS_NOLANGUAGE
  92.    EndIf
  93.    detect date
  94.    set-subst LF = "\n"
  95.    set-subst CR = "\r"
  96.    read-syms GeneralConstants
  97.    read-syms FileConstants
  98.    read-syms DialogConstants$(!STF_LANGUAGE)
  99.    read-syms FileConstants$(!STF_LANGUAGE)
  100.  
  101.    set-title  $(FunctionTitle)
  102.    set CommonStatus = STATUS_SUCCESSFUL
  103.  
  104. Begin = +
  105.  
  106.    IfStr(i) $(!NTN_InstallMode)    ==      deinstall
  107.       Set StartLabel = RemoveAdmin
  108.       Set REMOVE_SOFTWARE = {}
  109.       Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(Option)Name))
  110.    else-Ifstr(i) $(!NTN_InstallMode) == Update
  111.       set StartLabel = UpgradeAdmin
  112.    else-Ifstr(i) $(!NTN_InstallMode) == configure
  113.            goto configureadmin
  114.    else-Ifstr(i) $(!NTN_InstallMode) == bind
  115.            goto BindingsSfm
  116.    else-Ifstr(i) $(!NTN_InstallMode) == install
  117.       set StartLabel = InstallAdmin
  118.    else
  119.        Set StartLabel = end
  120.    endif
  121.    goto $(StartLabel)
  122.  
  123. ;------------------------------------------------------------------
  124. ; Install the product
  125. ;------------------------------------------------------------------
  126.  
  127. InstallAdmin = +
  128.  
  129.    Set FLibraryErrCtl = 1
  130.  
  131.    ; Detect if SFM is already installed
  132.  
  133.    Set ProductTextName = $(Product$(Option)Name)
  134.  
  135.    OpenRegKey $(!REG_H_LOCAL) "" $(ProductSFMName) $(!ACCESS) KeyProduct
  136.  
  137.    Ifstr $(KeyProduct) != $(!KeyNull)
  138.  
  139.       GetRegValue $(KeyProduct) $(MajorVersion) VersionInfo
  140.       set VersionMajor = *($(VersionInfo), 4)
  141.       GetRegValue $(KeyProduct) $(MinorVersion) VersionInfo
  142.       set VersionMinor = *($(VersionInfo), 4)
  143.       set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  144.  
  145.       ifstr(i) $(ProductVersion) == $(InstalledVersion)
  146.          read-syms SfmAlreadyInstalled$(!STF_LANGUAGE)
  147.          Set Text = $(Version)$(ProductVersion)
  148.          Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
  149.          goto end
  150.       EndIf
  151.    EndIf
  152.  
  153.  
  154.    ; Detect if res kit is  already installed. If installed, ask the user to
  155.    ; use the update option. Otherwise ask the user to input the
  156.    ; location of the SFM files
  157.  
  158.    Set !ProductKeyName        = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  159.    OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyName) $(!ACCESS) KeyProduct
  160.  
  161.    Ifstr $(KeyProduct) != $(!KeyNull)
  162.  
  163.       GetRegValue $(KeyProduct) $(MajorVersion) VersionInfo
  164.       set VersionMajor = *($(VersionInfo), 4)
  165.       GetRegValue $(KeyProduct) $(MinorVersion) VersionInfo
  166.       set VersionMinor = *($(VersionInfo), 4)
  167.       set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  168.  
  169.       ifstr(i) $(ProductVersion) == $(InstalledVersion)
  170.          read-syms MiscErrorString1$(!STF_LANGUAGE)
  171.          Set Text = $(Version)$(ProductVersion)$(OF)$(ProductTextName)
  172.          Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
  173.          goto end
  174.       EndIf
  175.    EndIf
  176.  
  177.    ifstr(i) $(!NTN_InstallMode) == "install"
  178.  
  179.       Ifstr(i) $(!DoCopy) == "YES"
  180.  
  181.       Shell $(UtilInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  182.  
  183.          Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  184.             Goto ShellCodeError
  185.          Else-Ifstr(i) $($R0) == STATUS_FAILED
  186.             Shell $(UtilInf) RegistryErrorString "ASK_SOURCE_FAIL"
  187.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  188.                goto ShellCodeError
  189.             endif
  190.             set Error = $($R0)
  191.             Goto end
  192.          Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  193.             Goto end
  194.          Endif
  195.  
  196.          Set SrcDir  = $($R1)
  197.  
  198.       Endif
  199.  
  200.    Endif
  201.  
  202. CopyAdminFiles = +
  203.  
  204.    install "Install-Initial"
  205.  
  206.    ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  207.       Shell "" RemoveAdminFiles "INSTALL"
  208.       goto usercancel
  209.    endif
  210.  
  211. StartInstall = +
  212.  
  213.    Set REMOVE_FLAG = TRUE
  214.    Set REMOVE_SOFTWARE = {}
  215.  
  216.    Ifstr(i) $(Option) == "SFMADM"
  217.  
  218.          Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE),$(Product$(Option)Name))
  219.  
  220.       Shell $(UtilInf), InstallSoftwareProduct, $(Manufacturer),$(Product$(Option)Name), $(ProductInfName)
  221.  
  222.       ifint $(ShellCode) != 0
  223.          goto ShellCodeError
  224.       endif
  225.       set RegistryErrorIndex = $($R0)
  226.       Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  227.          CloseRegKey $($R1)
  228.          CloseRegKey $($R2)
  229.          goto fatalregistry
  230.       Endif
  231.  
  232.       Set AdminProductKey       = $($R1)
  233.       Set AdminNetRuleKey       = $($R2)
  234.  
  235.       ; set product key information in the registry
  236.  
  237.       set NewValueList = +
  238.                    {{Infname,0,$(!REG_VT_SZ),$(ProductInfName)},+
  239.                    {Title,0,$(!REG_VT_SZ), $(Product$(Option)Title)},+
  240.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)},+
  241.                    {MajorVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  242.                    {MinorVersion,0,$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  243.                    {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  244.  
  245.       Shell $(UtilInf), AddValueList, $(AdminProductKey), $(NewValueList)
  246.       ifint $(ShellCode) != 0
  247.          goto ShellCodeError
  248.       endif
  249.  
  250.       set RegistryErrorIndex = $($R0)
  251.  
  252.       Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  253.          CloseRegKey $(AdminProductKey)
  254.          CloseRegKey $(AdminNetRuleKey)
  255.          goto fatalregistry
  256.       endif
  257.  
  258.       Set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  259.                          {Infname,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  260.  
  261.       Shell   $(UtilInf), AddValueList, $(AdminNetRuleKey), $(NewValueList)
  262.       ifint $(ShellCode) != 0
  263.          goto ShellCodeError
  264.       endif
  265.  
  266.       set RegistryErrorIndex = $($R0)
  267.       Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  268.          CloseRegKey $(AdminProductKey)
  269.          CloseRegKey $(AdminNetRuleKey)
  270.          goto fatalregistry
  271.       Endif
  272.  
  273.       CloseRegKey $(AdminProductKey)
  274.       CloseRegKey $(AdminRuleKey)
  275.  
  276.  
  277.       LoadLibrary "x" $(!STF_CWDDIR)sfmutil.dll !UTILHANDLE
  278.  
  279.       Debug-Output "Load Util Library"
  280.  
  281.       ; WRITE Private Profile String in NTNET.INI
  282.  
  283.       Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
  284.       Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
  285.       Set IniSection = $(SrvMgrIniSection)
  286.  
  287.       Debug-Output "Ini File = "$(IniFile)
  288.       Debug-Output "Ini String = "$(IniString)
  289.       Debug-Output "Ini Section = "$(IniSection)
  290.  
  291.  
  292.       Set FLibraryErrCtl = 1
  293.       LibraryProcedure IniStatus $(!UTILHANDLE) WriteAfpMgrIniStrings, $(IniSection), $(IniString), $(IniFile)
  294.       Set FLibraryErrCtl = 0
  295.       ifstr(i) $(IniStatus) == "FAILED"
  296.          read-syms AFPString3$(!STF_LANGUAGE)
  297.          shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  298.       EndIf
  299.  
  300.       ; Do the same thing for File Manager
  301.  
  302.       Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
  303.       Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
  304.       Set IniSection = $(WinFileIniSection)
  305.       Set FLibraryErrCtl = 1
  306.       LibraryProcedure IniStatus $(!UTILHANDLE) WriteAfpMgrIniStrings, $(IniSection), $(IniString), $(IniFile)
  307.       Set FLibraryErrCtl = 0
  308.       ifstr(i) $(IniStatus) == "FAILED"
  309.          read-syms AFPString2$(!STF_LANGUAGE)
  310.          shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  311.       EndIf
  312.  
  313.       FreeLibrary $(!UTILHANDLE)
  314.  
  315.    EndIf
  316.  
  317.    Ifstr(i) $(Option) == "ATALK"
  318.        
  319.       Set ThisOption = ATALK
  320.       Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(ThisOption)Name))
  321.  
  322.       LoadLibrary "x" $(!STF_CWDDIR)sfmutil.dll !UTILHANDLE
  323.  
  324.       Set Atalk_DependList = {"+NDIS"}
  325.       Set FLibraryErrCtl = 1
  326.       Shell $(UtilInf), AddSoftwareComponent,+
  327.                      $(Manufacturer), +
  328.                      $(Product$(ThisOption)Name),+
  329.                      $(Product$(ThisOption)Name), +
  330.                      $(Product$(ThisOption)DisplayName), +
  331.                      $(ProductInfName),+
  332.                      $(Product$(ThisOption)ImagePath),+
  333.                      "kernelautostart", "",+
  334.                      $(Atalk_DependList), "",+
  335.                      $(Product$(ThisOption)EventDll)
  336.  
  337.       Set FLibraryErrCtl = 0
  338.       Set RegistryErrorIndex = $($R0)
  339.       Ifstr(i) $(RegistryErrorIndex) !=  NO_ERROR
  340.          CloseRegKey $($R1)
  341.          CloseRegKey $($R2)
  342.          CloseRegKey $($R3)
  343.          CloseRegKey $($R4)
  344.          CloseRegKey $($R5)
  345.          goto fatalregistry
  346.       EndIf
  347.  
  348.       ;       At this point:
  349.       ;         $R1 contains the product version key handle;
  350.       ;         $R2 contains the NetRules subkey handle;
  351.       ;         $R3 contains the new Services key handle; and
  352.       ;         $R4 contains the Parameters key
  353.       ;         $R5 contains the Linkage Key
  354.       ;
  355.  
  356.       Set AtkVersKey          = $($R1)
  357.       Set AtkNetRuleKey       = $($R2)
  358.       Set AtkSvcKey           = $($R3)
  359.       Set AtalkParameters = $($R4)
  360.       Set AtkLinkageKey       = $($R5)
  361.  
  362.       set NewValueList = +
  363.          {{SoftwareType,0,$(!REG_VT_SZ),$(Product$(ThisOption)Type)},+
  364.          {Title,0,$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  365.          {Description,0,$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  366.          {PathName,0,$(!REG_VT_SZ),$(!STF_WINDOWSSYSPATH)},+
  367.          {ServiceName,0,$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  368.          {MajorVesion, 0, $(!REG_VT_DWORD),$(ProductMajorVersion)},+
  369.          {MinorVesion, 0, $(!REG_VT_DWORD),$(ProductMinorVersion)},+
  370.          {Review,0,$(!REG_VT_DWORD),1},+
  371.          {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  372.  
  373.       Shell  $(UtilInf), AddValueList, $(AtkVersKey), $(NewValueList)
  374.  
  375.       set RegistryErrorIndex = $($R0)
  376.  
  377.       Ifstr $(RegistryErrorIndex) != NO_ERROR
  378.          CloseRegKey $(AtkVersKey)
  379.          CloseRegKey $(AtkNetRuleKey)
  380.          CloseRegKey $(AtkSvcKey)
  381.          CloseRegKey $(AtkLinkageKey)
  382.          CloseRegKey $(AtalkParameters)
  383.          goto fatalregistry
  384.       EndIf
  385.  
  386.       set NewValueList = +
  387.          {{type,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)}, +
  388.          {use,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  389.          {bindform,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)}, +
  390.          {class,0, $(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)}, +
  391.          {bindable,0, $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)BindList)},+
  392.          {InfOption,0,$(!REG_VT_SZ),$(Option)}, +
  393.          {Infname,0,$(!REG_VT_SZ),$(ProductInfName)} }
  394.  
  395.       Shell  $(UtilInf), AddValueList, $(AtkNetRuleKey), $(NewValueList)
  396.  
  397.       set RegistryErrorIndex = $($R0)
  398.  
  399.       Ifstr $(RegistryErrorIndex) != NO_ERROR
  400.          CloseRegKey $(AtkVersKey)
  401.          CloseRegKey $(AtkNetRuleKey)
  402.          CloseRegKey $(AtkSvcKey)
  403.          CloseRegKey $(AtkLinkageKey)
  404.          CloseRegKey $(AtalkParameters)
  405.          goto fatalregistry
  406.       EndIf
  407.  
  408.       set NewValueList = {{OtherDependencies,0,$(!REG_VT_MULTI_SZ),{"+NDIS"}}}
  409.  
  410.       shell  $(UtilInf), AddValueList, $(AtkLinkageKey), $(NewValueList)
  411.  
  412.       set RegistryErrorIndex = $($R0)
  413.  
  414.       Ifstr $(RegistryErrorIndex) != NO_ERROR
  415.          CloseRegKey $(AtkVersKey)
  416.          CloseRegKey $(AtkNetRuleKey)
  417.          CloseRegKey $(AtkSvcKey)
  418.          CloseRegKey $(AtkLinkageKey)
  419.          CloseRegKey $(AtalkParameters)
  420.          goto fatalregistry
  421.       EndIf
  422.  
  423.       ;
  424.       ; Create the Adapters Key
  425.       ; CODEWORK - Localize ?
  426.       ;
  427.       CreateRegKey $(AtkSvcKey), {"Adapters",0,GenericClass},+
  428.                               "", $(!ACCESS), "" , KeyAdapters
  429.  
  430.    ; write global parameters
  431.  
  432.       Set DesiredZone = ""
  433.       set NewValueList = +
  434.          {{EnableRouter,0,$(!REG_VT_DWORD),0},+
  435.             {InitialInstall,0, $(!REG_VT_DWORD),1},+
  436.          {DesiredZone,0,$(!REG_VT_SZ),$(DesiredZone)}}
  437.  
  438.       Shell  $(UtilInf), AddValueList, $(AtalkParameters), $(NewValueList)
  439.  
  440.       set RegistryErrorIndex = $($R0)
  441.  
  442.       Ifstr(i) $(RegistryErrorIndex) !=  NO_ERROR
  443.          CloseRegKey $(KeyAdapters)
  444.          goto fatalregistry
  445.       EndIf
  446.  
  447.       ; Add WinSock Support to AppleTalk
  448.  
  449.       Set WinAtalkDll = $(!STF_WINDOWSSYSPATH)"\"$(AtWinSockDll)
  450.       Set MaxSockAddrLen      = 8
  451.       Set MinSockAddrLen      = 6
  452.  
  453.  
  454.       Shell $(UtilInf) AddWinsockInfo     $(Product$(ThisOption)Name), +
  455.                                     $(WinAtalkDll), +
  456.                                     $(MaxSockAddrLen),+
  457.                                     $(MinSockAddrLen)
  458.  
  459.       ifstr(i) $($R0) != NO_ERROR
  460.          read-syms AtalkString1$(!STF_LANGUAGE)
  461.          Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  462.       Endif
  463.  
  464.       ; close all open keys
  465.  
  466.       CloseRegKey $(AtkVersKey)
  467.       CloseRegKey $(AtkNetRuleKey)
  468.       CloseRegKey $(AtkSvcKey)
  469.       CloseRegKey $(AtkLinkageKey)
  470.       CloseRegKey $(AtalkParameters)
  471.       CloseRegKey $(KeyAdapters)
  472.  
  473.    EndIf
  474.  
  475.    goto successful
  476.  
  477.  
  478. Bindingssfm = +
  479.  
  480.    Set DefaultPortRemoved = FALSE
  481.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Linkage" $(!ACCESS) LinkageKey
  482.    Ifstr(i) $(LinkageKey) == $(!KeyNull)
  483.       Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  484.       Goto fatalregistry
  485.    Endif
  486.  
  487.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Parameters" $(!ACCESS) BindParmKey
  488.    Ifstr(i) $(BindParmKey) == $(!KeyNull)
  489.       Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  490.       Goto fatalregistry
  491.    Endif
  492.  
  493.    Set BindList = {}
  494.    Set ExportList = {}
  495.    Set RouteList  = {}
  496.  
  497.    GetRegValue $(LinkageKey) "Bind" BindList
  498.    GetRegValue $(LinkageKey) "Export" ExportList
  499.    GetRegValue $(LinkageKey) "Route" RouteList
  500.    GetRegValue $(LinkageKey) "Exclude" ExcludeList
  501.    QueryListSize BindCount $(BindList)
  502.    IfInt $(BindCount) == 0
  503.       Goto endbinding
  504.    Endif
  505.  
  506.    set NewBindList = {}
  507.    set NewExportList = {}
  508.    set NewRouteList = {}
  509.  
  510.    ForListDo *($(BindList),4)
  511.       Split-String $($), "\", BindInfo
  512.       set NewBindList = >($(NewBindList), *($(BindInfo),4))
  513.    EndForListDo
  514.  
  515.    ForListDo *($(ExportList),4)
  516.       set NewExportList = >($(NewExportList), $($))
  517.    EndForListDo
  518.  
  519.    ForListDo *($(RouteList),4)
  520.       set NewRouteList = >($(NewRouteList), $($))
  521.    EndForListDo
  522.  
  523.    ForListDo *($(ExcludeList),4)
  524.       set NewExcludeList = >($(NewExcludeList), $($))
  525.    EndForListDo
  526.  
  527.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Adapters" $(!ACCESS) AdapterKey
  528.    Ifstr(i) $(AdapterKey) == $(!KeyNull)
  529.       Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  530.       Goto fatalregistry
  531.    Endif
  532.  
  533.    set AdapterList = ""
  534.    EnumRegKey $(AdapterKey) AdapterList
  535.    Set AtalkAdapterList = {}
  536.    ForListDo $(AdapterList)
  537.       Set AtalkAdapterList = >($(AtalkAdapterList), *($($),1))
  538.    EndForListDo
  539.  
  540.    QueryListSize AdapterCount $(AtalkAdapterList)
  541.  
  542.    Set fAddingFirstAdapter = FALSE
  543.  
  544.    ifint $(AdapterCount) == 0
  545.          Set fAddingFirstAdapter = TRUE
  546.    EndIf
  547.  
  548.    Set NewBindings = ""
  549.    Set TobeUsedBindList = {}
  550.    Set TobeUsedExportList = {}
  551.    Set TobeUsedRouteList = {}
  552.  
  553.    ForListDo $(NewBindList)
  554.       IfContains(i) $($) not-in $(AtalkAdapterList)
  555.          Set NewBindings = TRUE
  556.          Set TobeUsedBindList = >($(TobeUsedBindList),"\Device\"$($))
  557.          Set TobeUsedExportList = >($(TobeUsedExportList),*($(NewExportList),$(#)))
  558.          Set TobeUsedRouteList = >($(TobeUsedRouteList),*($(NewRouteList),$(#)))
  559.  
  560.          Shell "" CreateAtalkConfig $($) $(AdapterKey)
  561.  
  562.          Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  563.             CloseRegKey $(AdapterKey)
  564.             Set RegistryErrorIndex = $($R1)
  565.             goto fatalregistry
  566.          EndIf
  567.  
  568.       Else
  569.          Set TobeUsedBindList = >($(TobeUsedBindList),"\Device\"$($))
  570.          Set TobeUsedExportList = >($(TobeUsedExportList),*($(NewExportList),$(#)))
  571.          Set TobeUsedRouteList = >($(TobeUsedRouteList),*($(NewRouteList),$(#)))
  572.      Endif
  573.  
  574.    EndForListDo
  575.  
  576.    set NewValueList = {{Bind,0,$(!REG_VT_MULTI_SZ),$(TobeUsedBindList)}, +
  577.                       {Export,0,$(!REG_VT_MULTI_SZ),$(TobeUsedExportList)}, +
  578.                       {Route,0,$(!REG_VT_MULTI_SZ),$(TobeUsedRouteList)}}
  579.  
  580.    Ifstr(i) $(NewBindings) == TRUE
  581.       Shell  $(UtilInf), AddValueList, $(LinkageKey), $(NewValueList)
  582.       set RegistryErrorIndex = $($R0)
  583.       CloseRegKey $(LinkageKey)
  584.       Ifstr(i) $(RegistryErrorIndex) !=  NO_ERROR
  585.          goto fatalregistry
  586.       EndIf
  587.    EndIf
  588.  
  589.    ;  Add the Default Port
  590.  
  591.    Set DefaultPort = {}
  592.    Set MediaTypeList = {}
  593.    GetRegValue $(BindParmKey) "DefaultPort" DefaultPort
  594.    Ifstr(i) $(DefaultPort) != {}
  595.       goto removeadapters
  596.    EndIf
  597.  
  598. finddefaultport = +
  599.  
  600.    ForListDo $(TobeUsedBindList)
  601.       Split-String $($) "\" PortName
  602.       Shell "" FindMediaType *($(PortName),4)
  603.       Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  604.          Set MediaTypeList = >($(MediaTypeList), $($R1))
  605.       EndIf
  606.    EndForListDo
  607.  
  608.    Ifcontains(i) "1" in $(MediaTypeList)
  609.       ForListDo $(MediaTypeList)
  610.          Ifint $($) == 1
  611.             Set DefaultPort = *($(TobeUsedBindList),$(#))
  612.             goto defportdone
  613.          EndIf
  614.       EndForListDo
  615.  
  616.    else-ifcontains(i) "4" in $(MediaTypeList)
  617.  
  618.       ForListDo $(MediaTypeList)
  619.          Ifint $($) == 4
  620.             Set DefaultPort = *($(TobeUsedBindList),$(#))
  621.             goto defportdone
  622.          EndIf
  623.       EndForListDo
  624.  
  625.    else-ifcontains(i) "2" in $(MediaTypeList)
  626.       ForListDo $(MediaTypeList)
  627.          Ifint $($) == 2
  628.             Set DefaultPort = *($(TobeUsedBindList),$(#))
  629.             goto defportdone
  630.          EndIf
  631.       EndForListDo
  632.    else-ifcontains(i) "3" in $(MediaTypeList)
  633.       Set DefaultPort = *($(TobeUsedBindList),1)
  634.    else
  635.       read-syms NoAdaptersFound$(!STF_LANGUAGE)
  636.       Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(ErrorString)
  637.       goto endbinding
  638.    Endif
  639.  
  640. defportdone = +
  641.  
  642.    Set NewValueList = {{DefaultPort,0,$(!REG_VT_SZ),$(DefaultPort)}}
  643.    Shell  $(UtilInf), AddValueList, $(BindParmKey), $(NewValueList)
  644.    set RegistryErrorIndex = $($R0)
  645.    Ifstr(i) $(RegistryErrorIndex) !=  NO_ERROR
  646.       goto fatalregistry
  647.    EndIf
  648.    goto startconfig
  649.  
  650. removeadapters = +
  651.    Split-String *($(DefaultPort),4) "\" PortName
  652.    ForListDo $(AtalkAdapterList)
  653.       Ifcontains(i) $($) not-in $(NewBindList)
  654.          DeleteRegKey $(AdapterKey) $($)
  655.          Ifstr(i) $($) == *($(PortName),4)
  656.             read-syms RemoveDefaultPort$(!STF_LANGUAGE)
  657.             Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  658.             Set DefaultPortRemoved = TRUE
  659.             goto finddefaultport
  660.         Endif
  661.       EndIf
  662.    EndForListDo
  663.  
  664.    ; if this is the first time configuration start appletalk and launch config
  665.    ; if the default port has been removed and other adapters are available
  666.    ; start appletalk
  667.  
  668. startconfig = +
  669.  
  670.    Set DoConfig = 0
  671.  
  672.    GetRegValue $(BindParmKey) "InitialInstall" DoConfig
  673.  
  674.    Set IsInitialInstall = *($(DoConfig),4)
  675.  
  676.    Debug-Output "Config State = "$(DoConfig)
  677.  
  678.    ifint $(IsInitialInstall) == 1
  679.          goto startsvc
  680.    EndIf
  681.  
  682.    ifstr(i) $(DefaultPortRemoved) == TRUE
  683.          goto startsvc
  684.    endif
  685.  
  686.    ifstr(i) $(fAddingFirstAdapter) == TRUE
  687.          goto startsvc
  688.    endif
  689.  
  690.    goto endbinding
  691.  
  692. startsvc = +
  693.    Set FLibraryErrCtl = 1
  694.    read-syms StatusStartingAppleTalk$(!STF_LANGUAGE)
  695.    Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  696.    StartWait
  697.    Set WaitStarted = 1
  698.    LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, AppleTalk
  699.    Shell $(SubInf) PopBillBoard
  700.  
  701.    Set START_STATUS = *($(START_RESULT),1)
  702.  
  703.    Debug-Output "OEMNXPSM.INF: Start AppleTalk; result was: "$(START_STATUS)
  704.  
  705.    Ifint $(START_STATUS) != 0
  706.       EndWait
  707.       Set WaitStarted = 0
  708.       LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), ERRORMSG, $(START_STATUS)
  709.       Set ATALK_ERROR_MESSAGE = *($(START_RESULT),2)
  710.       read-syms CannotStartAtalk$(!STF_LANGUAGE)
  711.       Set ErrorString  = $(ATALK_ERROR_MESSAGE)$(ErrorSuffix)
  712.       Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  713.    Else
  714.  
  715.          ; start the afd driver
  716.  
  717.       LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, Afd
  718.  
  719.       Set START_STATUS = *($(START_RESULT),1)
  720.  
  721.       Debug-Output "OEMNXPSM.INF: Start Afd result was: "$(START_STATUS)
  722.  
  723.       Ifint $(START_STATUS) != 0
  724.  
  725.          EndWait
  726.          Set WaitStarted = 0
  727.          LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), ERRORMSG, $(START_STATUS)
  728.          Set ATALK_ERROR_MESSAGE = *($(START_RESULT),2)
  729.          read-syms CannotStartAfd$(!STF_LANGUAGE)
  730.          Set ErrorString  = $(ATALK_ERROR_MESSAGE)$(ErrorSuffix)
  731.          Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  732.          goto endbinding
  733.  
  734.       EndIf
  735.  
  736.       ; Launch the AppleTalk Transport Configuration
  737.  
  738.       LoadLibrary "x" $(!STF_CWDDIR)sfmatcfg.dll ATHANDLE
  739.       Set FLibraryErrCtl = 1
  740.       Set atcfgresult = ""
  741.       LibraryProcedure atcfgresult, $(ATHANDLE),EnterAtalkConfigDLL $(!STF_HWND)
  742.       FreeLibrary $(ATHANDLE)
  743.       SetRegValue $(BindParmKey) {InitialInstall,0,$(!REG_VT_DWORD),0}
  744.  
  745.       ifint $(IsInitialInstall) == 1
  746.          read-syms SetupSuccess$(!STF_LANGUAGE)
  747.          Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Status)
  748.       EndIf
  749.       EndWait
  750.  
  751.    EndIf
  752.  
  753. endbinding = +
  754.    CloseRegKey $(BindParmKey)
  755.    goto end
  756.  
  757.  
  758. ConfigureAdmin = +
  759.  
  760.    Ifstr(i) $(Option) == "SFMADM"
  761.       read-syms CantConfigureADM$(!STF_LANGUAGE)
  762.       Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL",$(ErrorString)
  763.          goto successful
  764.    EndIf
  765.  
  766.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Linkage" $(!ACCESS) LinkageKey
  767.  
  768.    ifstr(i) $(LinkageKey) != $(!KeyNull)
  769.       GetRegValue $(LinkageKey) "Bind" BindList
  770.       ifstr(i) $(BindList) == ""
  771.          read-syms AtalkString3$(!STF_LANGUAGE)
  772.          Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  773.          goto endconfigui
  774.       endif
  775.    else
  776.       Set RegistryErrorIndex = $($R0)
  777.       goto fatalregistry
  778.    EndIf
  779.  
  780.    LoadLibrary "x" $(!STF_CWDDIR)sfmatcfg.dll ATHANDLE
  781.    Set FLibraryErrCtl = 1
  782.    Set atcfgresult = ""
  783.    LibraryProcedure atcfgresult, $(ATHANDLE),EnterAtalkConfigDLL $(!STF_HWND)
  784.    FreeLibrary $(ATHANDLE)
  785.  
  786. endconfigui = +
  787.    Set CommonStatus = STATUS_USERCANCEL
  788.    goto usercancel
  789.  
  790. RemoveAdmin = +
  791.  
  792.    ; Remove the SMAddons String in regnet.ini. This is done first, because
  793.    ; we remove the util dll in "SfmRemoveFiles". If RemoveFiles failed,
  794.    ; the SMAddons section will be restored to it's former shape.
  795.  
  796.    Debug-Output "OEMNSVKT.INF: Entering Remove"
  797.  
  798.  
  799.    Ifstr(i) $(!NTN_InstallMode) == deinstall
  800.       LoadLibrary "x" $(!STF_CWDDIR)sfmutil.dll !UTILHANDLE
  801.    EndIf
  802.  
  803.  
  804.    Ifstr(i) $(Option) == "SFMADM"
  805.  
  806.       Set FLibraryErrCtl  = 1
  807.       Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
  808.       Set IniSection = $(SrvMgrIniSection)
  809.       Set Result = ""
  810.       Set FLibraryErrCtl = 1
  811.       LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, $(IniSection), NULL, $(IniFile)
  812.       Set FLibraryErrCtl = 0
  813.  
  814.       ; Remove the file manager addons also
  815.  
  816.       Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
  817.       Set IniSection = $(WinFileIniSection)
  818.       Set FLibraryErrCtl = 1
  819.       LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, $(IniSection), NULL, $(IniFile)
  820.       Set FLibraryErrCtl = 0
  821.  
  822.    EndIf
  823.  
  824.    Shell "" RemoveAdminFiles "REMOVE"
  825.  
  826.    ForListDo  $(REMOVE_SOFTWARE)
  827.       debug-output "Removing component: "$($)
  828.       Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  829.    EndForListDo
  830.  
  831.    FreeLibrary $(!UTILHANDLE)
  832.    ; LibraryProcedure Status, $(!LIBHANDLE), DelFile $(!STF_CWDDIR)$(UtilDll)
  833.    goto end
  834.  
  835. UpgradeAdmin = +
  836.  
  837.    ifstr(i) $(!ProductKeyName) == $(!NTN_RegBase)
  838.  
  839.       OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyName) $(!ACCESS) KeyProduct
  840.  
  841.       Ifstr $(KeyProduct) != $(!KeyNull)
  842.  
  843.          GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  844.          set Version = *($(VersionInfo), 4)
  845.          Split-String $(!NTN_Infname), "\", FilenameList
  846.          QueryListSize ListSize $(FilenameList)
  847.          set !UG_Filename = *($(FilenameList), $(ListSize))
  848.  
  849.          install Install-Update
  850.          ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  851.             goto fatal
  852.          endif
  853.  
  854.          FreeLibrary $(!UTILHANDLE)
  855.  
  856.          Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  857.             Goto ShellCodeError
  858.          EndIf
  859.  
  860.          SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  861.          SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  862.          CloseRegKey $(KeyProduct)
  863.       else
  864.          Set RegistryErrorIndex = $($R0)
  865.          goto fatalregistry
  866.       endif
  867.  
  868.    endif
  869.  
  870.    goto end
  871.  
  872. successful = +
  873.  
  874.     Set Status = STATUS_SUCCESSFUL
  875.     goto end
  876.  
  877. ShellCodeError = +
  878.    read-syms ShellingError$(!STF_LANGUAGE)
  879.    Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  880.  
  881. fatalregistry = +
  882.    EndWait
  883.    Shell $(UtilInf) RegistryErrorString $(RegistryErrorIndex)
  884.    IfInt $(ShellCode) != 0
  885.       goto ShellCodeError
  886.    Endif
  887.    set Error = $($R0)
  888.    goto fatal
  889.  
  890. fatal = +
  891.    Ifint $(BillboardVisible) != 0
  892.       Shell $(SubInf) PopBillboard
  893.       Set BillboardVisible = 0
  894.    Endif
  895.    read-syms MiscErrorString3$(!STF_LANGUAGE)
  896.    Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL",$(ErrorString)$(Error)
  897.    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  898.       goto ShellCodeError
  899.    endif
  900.    goto failed
  901.  
  902. failed = +
  903.    set CommonStatus = STATUS_FAILED
  904.    ifstr(i) $(REMOVE_FLAG) == TRUE
  905.       set REMOVE_FLAG = FALSE
  906.       goto RemoveAdmin
  907.    endif
  908.    goto end
  909.  
  910. usercancel = +
  911.  
  912.    Set CommonStatus = STATUS_USERCANCEL
  913.  
  914. end = +
  915.  
  916.    Return $(CommonStatus)
  917.  
  918. ;-------------------------------------------------------------
  919. ;        ROUTINE        : Find MediaType
  920. ;        DESCRIPTION    : Gets the media type of the card
  921. ;        RETURNS        : R0: STATUS_SUCCESSFUL | STATUS_FAILED
  922. ;                       : R1: RegistryErrorIndex, if error, else media type
  923. ;
  924. ;------------------------------------------------------------
  925.  
  926. [FindMediaType]
  927.  
  928.    Set Status = STATUS_FAILED
  929.    Set CardName = $(!NTN_ServiceBase)"\"$($0)"\Parameters"
  930.    OpenRegKey $(!REG_H_LOCAL) "" $(CardName) $(!ACCESS) CardKey
  931.  
  932.    Ifstr(i) $(CardKey) == $(!KeyNull)
  933.       Set RegistryErrorIndex = $($R0)
  934.       Return $(Status) $(RegistryErrorIndex)
  935.    EndIf
  936.  
  937.    GetRegValue $(CardKey) "MediaType" MediaTypeList
  938.  
  939.    Set MediaType = *($(MediaTypeList),4)
  940.    Set Status = STATUS_SUCCESSFUL
  941.    Return $(Status) $(MediaType)
  942.  
  943. ;-------------------------------------------------------------
  944. ;        ROUTINE        : CreateAtalkConfig
  945. ;        DESCRIPTION    : Creates the registry entries for AppleTalk
  946. ;        RETURNS        : R0: STATUS_SUCCESSFUL | STATUS_FAILED
  947. ;                       : R1: RegistryErrorIndex
  948. ;
  949. ;------------------------------------------------------------
  950.  
  951. [CreateAtalkConfig]
  952.    Set AdapterName         = $($0)
  953.    Set KeyAdapters         = $($1)
  954.    Set RetStatus    = STATUS_SUCCESSFUL
  955.  
  956.    read-syms GeneralConstants
  957.    CreateRegKey $(KeyAdapters) {$(AdapterName), 0, GenericClass} "" $(!ACCESS) "", TempKeyAdapters
  958.  
  959.    Shell "" FindMediaType $($0)
  960.  
  961.    Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  962.       Set MediaType = $($R1)
  963.    else
  964.       Set RegistryErrorIndex = $($R1)
  965.       Set RetStatus = $($R0)
  966.       goto return
  967.    EndIf
  968.    set PortName            = $($0)"@"$(!STF_COMPUTERNAME)
  969.    set ZoneList            = {""}
  970.    set AarpRetries         = 10
  971.    set DefaultZone         = ""
  972.    set NewValueList = +
  973.             {{"AarpRetries",0,$(!REG_VT_DWORD),$(AarpRetries)}, +
  974.             {"DefaultZone", 0,$(!REG_VT_SZ),$(DefaultZone)},+
  975.             {"NetworkRangeUpperEnd",0,$(!REG_VT_DWORD),0 },+
  976.             {"NetworkRangeLowerEnd",0,$(!REG_VT_DWORD),0 },+
  977.             {"ZoneList",0,$(!REG_VT_MULTI_SZ),$(ZoneList)},+
  978.             {"SeedingNetwork", 0,$(!REG_VT_DWORD),0},+
  979.             {"DdpCheckSums", 0,$(!REG_VT_DWORD),0},+
  980.             {"PortName",0,$(!REG_VT_SZ),$(PortName)}}
  981.  
  982.    Shell  $(UtilInf),AddValueList, $(TempKeyAdapters), $(NewValueList)
  983.  
  984.    set RegistryErrorIndex = $($R0)
  985.    Ifstr $(RegistryErrorIndex) != NO_ERROR
  986.       CloseRegKey $(TmpKeyAdapters)
  987.       Set RetStatus = STATUS_FAILED
  988.    EndIf
  989.  
  990. return = +
  991.  
  992.    Return $(RetStatus) $(RegistryErrorIndex)
  993.  
  994. [RemoveAdminFiles]
  995.  
  996.    Set Status = STATUS_SUCCESSFUL
  997.    Set RemoveList = {}
  998.    Set Mode = $($0)
  999.  
  1000.    ifstr(i) $(Option) == "SFMADM"
  1001.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSVCAPI, 1))
  1002.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSVCMGR, 1))
  1003.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, SFMHELP, 1))
  1004.    EndIf
  1005.  
  1006.    ifstr(i) $(Option) == "ATALK"
  1007.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATCONFIG, 1))
  1008.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATMSG, 1))
  1009.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATWSOCK, 1))
  1010.       Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATDRIVER, 1))
  1011.    EndIf
  1012.  
  1013.    ForListDo $(RemoveList)
  1014.  
  1015.       Set DelStatus = ""
  1016.       Debug-Output "Deleting File "$($)
  1017.       Set FLibraryErrCtl = 1
  1018.       Ifstr(i) $(Mode) == "REMOVE"
  1019.          LibraryProcedure DelStatus $(!UTILHANDLE), DelFile $($)
  1020.          ifstr(i) $(DelStatus) == "FAILED"
  1021.             Set DelOnRebootList = >($(DelOnRebootList), $($))
  1022.          EndIf
  1023.       else
  1024.          LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($)
  1025.       EndIf
  1026.       Set FLibraryErrCtl = 0
  1027.  
  1028.    EndForListDo
  1029.  
  1030.    ForListDo $(DelOnRebootList)
  1031.  
  1032.       Ifstr(i) $(Mode) == "REMOVE"
  1033.          Debug-Output "File to remove on reboot = "$($)
  1034.          AddFileToDeleteList $($)
  1035.       else
  1036.          Set FLibraryErrCtl  = 1
  1037.          LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($)
  1038.          Set FLibraryErrCtl  = 0
  1039.       EndIf
  1040.  
  1041.    EndForListDo
  1042.  
  1043.    Return $(Status)
  1044.  
  1045. [Install-Update]
  1046.    set STF_VITAL = ""
  1047.    CopyFilesInCopyList
  1048.    Exit
  1049.  
  1050. [Install-Initial]
  1051.  
  1052.    set STF_VITAL = ""
  1053.  
  1054.    AddSectionFilesToCopyList Files-MISC $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1055.  
  1056.    Ifstr(i) $(Option) == "ATALK"
  1057.       AddSectionFilesToCopyList Files-ATALK $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1058.       AddSectionFilesToCopyList Files-ATALKDRIVER $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1059.    EndIf
  1060.  
  1061.    Ifstr(i) $(Option) == "SFMADM"
  1062.       AddSectionFilesToCopyList Files-ADMTOOLS $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1063.    EndIf
  1064.  
  1065.    CopyFilesInCopyList
  1066.  
  1067.    Exit
  1068.  
  1069. [Files-RemoveList]
  1070.  
  1071. AFPSVCAPI       = $(!STF_WINDOWSSYSPATH)\sfmapi.dll
  1072. AFPSVCMGR       = $(!STF_WINDOWSSYSPATH)\sfmmgr.dll
  1073. SFMHELP            = $(!STF_WINDOWSSYSPATH)\sfmmgr.hlp
  1074. ATCONFIG        = $(!STF_WINDOWSSYSPATH)\sfmatcfg.dll
  1075. ATMSG            = $(!STF_WINDOWSSYSPATH)\sfmatmsg.dll
  1076. ATWSOCK            = $(!STF_WINDOWSSYSPATH)\sfmwhsat.dll
  1077. ATDRIVER        = $(!STF_WINDOWSSYSPATH)\drivers\sfmatalk.sys
  1078.  
  1079.  
  1080. [LanguagesSupported]
  1081.    ENG
  1082. [OptionsTextENG]
  1083.    SFMADMTOOLS = "Services for Macintosh Administrator Tools"
  1084.    ATALK       = "AppleTalk Protocol"
  1085.  
  1086. [FileConstantsENG]
  1087. ProductSFMADMTitle            = "Services for Macintosh Administrator Tools"
  1088. ProductSFMADMDescription    = "Services for Macintosh Administrator Tools"
  1089. ProductATALKTitle            = "AppleTalk Protocol"
  1090. ProductSFMADMName             = "SFMADM"
  1091. FunctionTitle               = "Services for Macintosh Resource Kit Setup"
  1092. ProductATALKDescription     = "AppleTalk Protocol"
  1093.  
  1094. ; AppleTalk Transport Product Descriptions /Net Rules
  1095.  
  1096. ProductATALKName           = "AppleTalk"
  1097. ProductATALKImagePath   = "%SystemRoot%\system32\drivers\sfmatalk.sys"
  1098. ProductATALKSvcType     = "kernel"
  1099. ProductATALKType        = "transport"
  1100. ProductATALKEventDll    = "%SystemRoot%\system32\sfmatmsg.dll"
  1101. NetRuleATALKType        = "appletalk appletalktransport"
  1102. NetRuleATALKUse         = transport " yes yes"
  1103. NetRuleATALKBindForm    = """appletalk"" yes yes container"
  1104. NetRuleATALKClass       = {"appletalktransport basic "}
  1105. NetRuleATALKBindList    = {"appletalktransport ndisDriver non non 100", +
  1106.                            "appletalktransport ltkndisDriver non exclusive 100" }
  1107.  
  1108.  
  1109. ProCaption      = $(FunctionTitle)
  1110. ProCancel       = "Cancel"
  1111. ProCancelMsg    = "Services for Macintosh Resource Kit is not correctly installed. "+
  1112.                   "Are you sure you want to cancel copying files ?"
  1113. ProCancelCap    = "Services for Macintosh Resource Kit Setup"
  1114. ProText1        = "Copying:"
  1115. ProText2        = "To:"
  1116. Error           = "User has cancelled copying files. Copied files will be removed."
  1117.  
  1118. MajorVersion    = "MajorVersion"
  1119. MinorVersion    = "MinorVersion"
  1120. Version            =  "Version "
  1121. OF                = " of "
  1122.  
  1123. AskLocationText = "Please enter the full path of the Services for "+
  1124.                   "Macintosh distribution files.  If you want to install "+
  1125.                   "files from the original Setup floppy disks, type a drive "+
  1126.                   "letter (such as A:) and Setup will prompt you for the correct "+
  1127.                   "disk.  Then choose continue."
  1128.  
  1129. [DialogConstantsENG]
  1130. Help        = "&Help"
  1131. Exit        = "Cancel"
  1132. OK          = "OK"
  1133. HelpContext = ""
  1134. Continue    = "Continue"
  1135. Cancel      = "Cancel"
  1136.  
  1137. [ExitWarningDlgENG]
  1138. STF_MB_TITLE    = "Services for Macintosh Resource Kit Setup"
  1139. STF_MB_TEXT     = "Services for Macintosh Resource Kit is not correctly installed. Are you "+
  1140.                   "sure you want to exit Setup?"
  1141.  
  1142. ;no translation needed after this
  1143.  
  1144. DlgType         = "MessageBox"
  1145. STF_MB_TYPE     = 3
  1146. STF_MB_ICON     = 5
  1147. STF_MB_DEF      = 2
  1148.  
  1149. ;------------------------------------------------------------------
  1150. ; Error Strings
  1151. ;------------------------------------------------------------------
  1152.  
  1153. ;------------------------------------------------------------------
  1154. ; Miscellaneous Errors
  1155. ;------------------------------------------------------------------
  1156.  
  1157. [MiscErrorString1ENG]
  1158. ErrorString = +
  1159. " is already installed on your system. "+
  1160. "Use [Update] to update to newer versions."
  1161.  
  1162. [SfmAlreadyInstalledENG]
  1163. ErrorString = +
  1164. " of Services for Macintosh is already installed on your system. "+
  1165. "You have to remove Services for Macintosh before installing the "+
  1166. "Reource Kit."
  1167.  
  1168. [MiscErrorString3ENG]
  1169. ErrorString = +
  1170. "Setup encountered the following error during installation. Try installing "+
  1171. "after rebooting your system. "$(LF)
  1172.  
  1173. [ShellingErrorENG]
  1174. ErrorString  = +
  1175. "An internal error occurred. Contact Technical Support."
  1176.  
  1177. [CannotStartAtalkENG]
  1178. ErrorSuffix = +
  1179. "Setup was unable to start the AppleTalk Protocol. You will be unable to choose "+
  1180. "a desired zone at this time."
  1181.  
  1182. [CannotStartAfdENG]
  1183. ErrorSuffix = +
  1184. "Setup was unable to start the AFD Driver. You will be unable to choose "+
  1185. "a desired zone at this time."
  1186.  
  1187. [StatusStartingAppleTalkENG]
  1188. Status = "Starting AppleTalk Protocol..."
  1189.  
  1190. ;------------------------------------------------------------------
  1191. ; AppleTalk Transport Error Strings
  1192. ;------------------------------------------------------------------
  1193.  
  1194. [AtalkString1ENG]
  1195. ErrorString  = +
  1196. "Setup cannot add Windows sockets support for the AppleTalk protocol. "+
  1197. "Windows sockets applications will be unable to use the AppleTalk Protocol. "+
  1198. "Remove Services for Macintosh after installation and re-install. If the problem "+
  1199. "persists, contact Microsoft support."
  1200.  
  1201. [AtalkString2ENG]
  1202. ErrorString  = +
  1203. "Setup cannot remove Windows Sockets support for the AppleTalk protocol."
  1204.  
  1205.  
  1206. [AtalkString3ENG]
  1207. ErrorString  = +
  1208. "Services for Macintosh has just been installed. Services will be "+
  1209. "available to Macintosh workstations in the default network. If you would like "+
  1210. "the services to appear in a different zone or to configure routing, close "+
  1211. "the Control Panel, reboot, start AppleTalk and use the Control Panel "+
  1212. "to configure Services for Macintosh."
  1213.  
  1214.  
  1215. [AFPString2ENG]
  1216. ErrorString = +
  1217. "Setup cannot add the Macintosh File Server to the File Manager. "+
  1218. "You will be unable to work with Macintosh accessible volumes from "+
  1219. "File Manager."
  1220.  
  1221.  
  1222. [AFPString3ENG]
  1223. ErrorString  = +
  1224. "Setup cannot add the Macintosh File Server to the Server Manager. "+
  1225. "You will be unable to work with Services for Macintosh servers from "+
  1226. "Server Manager."
  1227.  
  1228. [NoAdaptersFoundENG]
  1229.  
  1230. ErrorString = +
  1231. "Setup cannot find any network adapter for the AppleTalk Protocol. You will "+
  1232. "be unable to use AppleTalk Protocol. Try adding a network adapter or "+
  1233. "enable the bindings for AppleTalk Protocol."
  1234.  
  1235. [RemoveDefaultPortENG]
  1236. ErrorString  = +
  1237. "Setup has detected that the default network adapter used by AppleTalk "+
  1238. "Protocol has been removed. Setup will change the default network, if "+
  1239. "one is available."
  1240.  
  1241. [CantConfigureADMENG]
  1242. ErrorString = +
  1243. "You cannot configure this software component."
  1244.  
  1245. [SetupSuccessENG]
  1246. Status  = +
  1247. "AppleTalk Protocol installation is complete. "+
  1248. "AppleTalk will start automatically when you reboot."
  1249.  
  1250. [Files-Inf]
  1251. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  1252.  
  1253. [Files-ATALK]
  1254. 2,SFMATCFG.DLL , SIZE=88888
  1255. 2,SFMATMSG.DLL , SIZE=88888
  1256. 2,SFMWSHAT.DLL , SIZE=88888
  1257.  
  1258. [Files-ATALKDRIVER]
  1259. 2,SFMATALK.SYS , SIZE=88888
  1260.  
  1261. [Files-MISC]
  1262. 2,SFMUTIL.DLL , SIZE=88888
  1263.  
  1264. [Files-ADMTOOLS]
  1265. 2,SFMAPI.DLL , SIZE=88888
  1266. 2,SFMMGR.HLP , SIZE=88888
  1267. 2,SFMMGR.CPL ,  SIZE=88888 RENAME=sfmmgr.dll
  1268. 
  1269. ;***********************************************************************
  1270. ; SOURCE MEDIA DESCRIPTION            
  1271. ; ------------------------
  1272. ;***********************************************************************
  1273. [Source Media Descriptions]
  1274.     1= "Windows NT Resource Kit CD-ROM" , TAGFILE = disk1
  1275.     2 = "Windows NT Resource Kit CD-ROM" , TAGFILE = disk2
  1276.     3= "Windows NT Resource Kit CD-ROM" , TAGFILE = disk3
  1277.  
  1278. [ProductType]
  1279.  
  1280. STF_PRODUCT  = WinNT
  1281. STF_PLATFORM = I386
  1282.